<div class="tutorial-editable-content">
    <p-tree [value]="data" selectionMode="single" [(selection)]="selectedFile"
    (onNodeSelect)="nodeSelect($event)" (onNodeUnselect)="nodeUnselect($event)">
        <ng-template let-node pTemplate="default">
            <!-- <input [(ngModel)]="node.label" type="text" style="width:100%" class="ui-inputtext"> -->
            <div class="tutorial-folder" style="margin-right: 10px">
                {{ node.label }}
            </div>
            <div class="editable-partition tutorial-folder" *ngIf="editAuth">
                <div class="tutorial-folder" *ngIf="node.children">
                    <p (click)="addFolder($event,node)">添加</p>
                    <p *ngIf="node.id!=0" (click)="deleteFolder(node)">删除</p>
                </div>
                <div class="tutorial-folder" *ngIf="!node.children">
                    <a routerLink="/notebook" [queryParams]="{id:node.id}" target="notebook">修改</a>
                    <p (click)="deleteFolder(node)">删除</p>
                </div>
            </div>



        </ng-template>
    </p-tree>
</div>

<p-dialog [(visible)]="addFolderDisplay"
           modal="true"
           dismissableMask="true"
           [style]="{width: '350px'}"
           header="添加一个文件或文件夹">
   <div class="content_add_info">
       <div class="row">
         <section class="box2">
            <p-selectButton [options]="fileOrFolder" [(ngModel)]="choice"></p-selectButton>
         </section>
       </div>
       <div class="ui-inputgroup">
        <span class="ui-inputgroup-addon"><i class="pi pi-file" style="line-height: 1.25;"></i></span>
        <input type="text" pInputText placeholder="文件或文件夹名" [(ngModel)]="name">
       </div>
   </div>
   <p-footer>
    <p-button label="确认" icon="pi pi-check" iconPos="left" (click)="saveContentItem()"></p-button>
    <p-button label="取消" icon="pi pi-times" iconPos="left" (click)="cancel()"></p-button>
    </p-footer>
</p-dialog>



